<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <h3>undefined - 相当于是空数组不显示</h3>
        <ul>
            <li v-for="item in undefined">undefined</li>
        </ul>
        <h3>null - 相当于是空数组不显示</h3>
        <ul>
            <li v-for="item in null">null</li>
        </ul>
        <h3>空字符串 - 相当于是空数组不显示</h3>
        <ul>
            <li v-for="item in ''">null</li>
        </ul>
        <h3>空数组 - 不显示</h3>
        <ul>
            <li v-for="item in []">[]</li>
        </ul>
    </div>
    <script>
        Vue.config.productionTip = false
        new Vue({
            el: '#demo',
            data: {}
        })
    </script>
</body>

</html>